<?php
/**
 * Created by PhpStorm.
 * User: wz
 * Date: 2018/7/30
 * Time: 22:18
 */

namespace App\Http\Controllers\Index;

use App\Base\BaseFunc;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;

class XinController extends Controller
{
    public function bgStoryList()
    {
        $data['bgStoryList'] = DB::table('bg_story')
            ->where('bg_story_floor',session('ad_floor'))
            ->orderby('bg_story_id','desc')
            ->paginate(10);
        return view('/index.xin.bgStoryList',$data);
    }

    public function bgStoryInfo($id)
    {
        $data['bgStoryInfo']  = DB::table('bg_story')
            ->where('bg_story_id',$id)
            ->first();
        return view('/index.xin.bgStoryInfo',$data);
    }

    public function baseDoList()
    {
        $data['baseDoList'] = DB::table('base_do')
            ->where('base_do_floor',session('ad_floor'))
            ->orderby('base_do_id','desc')
            ->paginate(10);
        return view('/index.xin.baseDoList',$data);
    }

    public function baseDoInfo($id)
    {
        $data['baseDoInfo']  = DB::table('base_do')
            ->where('base_do_id',$id)
            ->first();
        return view('/index.xin.baseDoInfo',$data);
    }

    public function gameKeyList()
    {
        $data['gameKeyList'] = DB::table('game_key')
            ->where('game_key_floor',session('ad_floor'))
            ->orderby('game_key_id','desc')
            ->paginate(10);
        return view('/index.xin.gameKeyList',$data);
    }

    public function gameKeyInfo($id)
    {
        $data['gameKeyInfo'] = DB::table('game_key')
            ->where('game_key_id', $id)
            ->first();
        return view('/index.xin.gameKeyInfo', $data);
    }

    public function newAskList()
    {
        $data['newAskList'] = DB::table('new_ask')
            ->where('new_ask_floor',session('ad_floor'))
            ->orderby('new_ask_id','desc')
            ->paginate(10);
        return view('/index.xin.newAskList',$data);
    }

    public function newAskInfo($id)
    {
        $data['newAskInfo'] = DB::table('new_ask')
            ->where('new_ask_id', $id)
            ->first();
        return view('/index.xin.newAskInfo', $data);
    }

    public function speedWarningList()
    {
        $data['speedWarningList'] = DB::table('speed_warning')
            ->where('speed_warning_floor',session('ad_floor'))
            ->orderby('speed_warning_id','desc')
            ->paginate(10);
        return view('/index.xin.speedWarningList',$data);
    }

    public function speedWarningInfo($id)
    {
        $data['speedWarningInfo'] = DB::table('speed_warning')
            ->where('speed_warning_id', $id)
            ->first();
        return view('/index.xin.speedWarningInfo',$data);
    }
}